<div class="umb-panel" ng-controller="Umbraco.Dialogs.LinkPickerController">
	<div class="umb-panel-body no-header with-footer compact">
		<umb-pane>
	<umb-control-group label="@defaultdialogs_urlLinkPicker" class="umb-property--pull">
	    <input type="text"
	           localize="placeholder"
	           placeholder="@general_url"
	           class="umb-editor umb-textstring"
	           ng-model="target.url"
	           ng-disabled="target.id || target.udi" />
	</umb-control-group>

	<umb-control-group label="@defaultdialogs_anchorLinkPicker" class="umb-property--push">
	    <input type="text"
	           list="anchors"
	           localize="placeholder"
	           placeholder="@placeholders_anchor"
	           class="umb-editor umb-textstring"
	           ng-model="target.anchor" />

		<datalist id="anchors">
					<option value="{{a}}" ng-repeat="a in anchorValues"></option>
				</datalist>
	</umb-control-group>			

			<umb-control-group label="@defaultdialogs_nodeNameLinkPicker">
				<input type="text"
					localize="placeholder" 
					placeholder="@placeholders_entername" 
					class="umb-editor umb-textstring" 
					ng-model="target.name" />
			</umb-control-group>

			<umb-control-group label="@content_target">
				<select class="umb-editor umb-dropdown" ng-model="target.target">
					<option value=""></option>
					<option value="_blank"><localize key="defaultdialogs_openInNewWindow">Opens the linked document in a new window or tab</localize></option>
				</select>
			</umb-control-group>
		</umb-pane>

        <umb-tree-search-box hide-search-callback="hideSearch"
                             search-callback="onSearchResults"
                             search-from-id="{{searchInfo.searchFromId}}"
                             search-from-name="{{searchInfo.searchFromName}}"
                             show-search="{{searchInfo.showSearch}}"
                             section="{{section}}">
        </umb-tree-search-box>
        
        <br/>

        <umb-tree-search-results ng-if="searchInfo.showSearch"
                                 results="searchInfo.results"
                                 select-result-callback="selectResult">
        </umb-tree-search-results>
        
	    <div ng-hide="searchInfo.showSearch">
            <umb-tree section="content"
                      hideheader="true"
                      hideoptions="true"
                      eventhandler="dialogTreeEventHandler"
                      isdialog="true"
                      enablecheckboxes="true">
            </umb-tree>    
	    </div>
        
	</div>

	<div class="umb-panel-footer">
		<div class="umb-el-wrap umb-panel-buttons">
	        <div class="btn-toolbar umb-btn-toolbar pull-right">
	        	<a href ng-click="close()" class="btn btn-link">
	        		<localize key="general_cancel">Cancel</localize>
				</a>
	            <a href ng-click="switchToMediaPicker()" class="btn">
                    <localize key="defaultdialogs_selectMedia">Select media</localize>
	            </a>
				<button
					class="btn btn-primary"
					ng-click="submit(target)">
					<localize key="buttons_select">Select</localize>
				</button>
	        </div>
		</div>
	</div>
</div>
